package main

func main() {

}

type ListNode struct {
	Val  int
	Next *ListNode
}

/**
 * @Description: 快慢指针实现
 */
//https://leetcode-cn.com/problems/middle-of-the-linked-list/
func middleNode(head *ListNode) *ListNode {
	fast, low := head, head
	for fast != nil && fast.Next != nil {
		fast = fast.Next.Next
		low = low.Next
	}
	return low
}
